package com.iqik.change.mapper;

import com.iqik.change.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {

    @Select("select id, name, nick, age from t_user where id = #{id}")
    User getUserById(int id);

    @Select("select id, name, nick, age from t_user")
    List<User> getUsers();

}
